package java期末作业;

public class person {
    private String name;
    private int age;
    private double blance;
    private boolean isSingle;
    public void setName(String nameparam){
        name = nameparam;

    }
    public String getName(){
        return name;
    }
    public void setAge(int ageparam){
        if (ageparam < 1 || ageparam > 130) {
            System.out.println("年纪不符合规范");
        }else {
            age = ageparam;
        }

    }
    public int getAge(){
        return age;
    }
}
